package com.yuerlive.rainbow.service;

import org.json.JSONException;
import org.json.JSONObject;

public class PushType {
    private final static String KEY = "wycategory";
    private final static String KEY_OBJECT = "wyobject";
    private final static String KEY_EXTEND = "wyextend";

    public JSONObject jsonObject;
    private String value;

    public JSONObject getJsonObject() {
        return jsonObject;
    }

    public void setJsonObject(JSONObject jsonObject) {
        this.jsonObject = jsonObject;
    }

    public String getObjectId() {
        String objectId = "-1";
        try {
            objectId = jsonObject.getString(KEY_OBJECT);
        } catch (JSONException e) {
            e.printStackTrace();
            return objectId;
        }
        return objectId;
    }

    public String getExtend() {
        String objectId = "-1";
        try {
            objectId = jsonObject.getString(KEY_EXTEND);
        } catch (JSONException e) {
            e.printStackTrace();
            return objectId;
        }
        return objectId;
    }
}
